package y23.Apr;

import java.util.Scanner;

public class Common {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入两个数字");
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = a % b;
        while(a % b != 0) {
            a = b;
            b = c;
            c = a % b;
        }
        System.out.println("最大公约数是"+b);
    }
}
